import {
  ProForm,
  ProFormColorPicker,
  ProFormRate,
  ProFormText,
} from "@ant-design/pro-components";
import { message } from "antd";

import React from "react";

const Page7: React.FC = () => {
  const handleSubmit = async (values: any) => {
    console.log("表单数据:", values);
    message.success("提交成功！");
  };

  return (
    <div style={{ padding: 24 }}>
      <h1>评分颜色表单</h1>
      <ProForm
        onFinish={handleSubmit}
        layout="vertical"
        style={{ maxWidth: 600 }}
      >
        <ProFormText
          name="productName"
          label="产品名称"
          placeholder="请输入产品名称"
          rules={[{ required: true, message: "请输入产品名称" }]}
        />

        <ProFormRate
          name="rating"
          label="产品评分"
          rules={[{ required: true, message: "请评分" }]}
        />

        <ProFormColorPicker
          name="primaryColor"
          label="主色调"
          rules={[{ required: true, message: "请选择主色调" }]}
        />

        <ProFormColorPicker name="secondaryColor" label="辅助色" />

        <ProFormRate
          name="satisfaction"
          label="满意度"
          count={10}
          character="😊"
        />
      </ProForm>
    </div>
  );
};

export default Page7;
